/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     blastFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.0025;

deltaT          1e-7;

writeControl    adjustableRunTime;

writeInterval   5e-5;

cycleWrite      0;

writeFormat     binary;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   12;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo           0.5;

maxDeltaT       1;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

functions
{
    impulse
    {
        type                impulse;

        writeControl        writeTime;
        pRef                101298;
    }
    overpressure
    {
        type                overpressure;

        writeControl        writeTime;
        store               yes;
        pRef                101298;
    }
    maxPImpulse
    {
        type                fieldMax;

        writeControl        writeTime;
        fields
        (
            overpressure
            impulse
        );
    }

    surfaces
    {
        type                surfaces;
        writeControl        adjustableRunTime;
        writeInterval       1e-4;
        interpolate         false;
        interpolationScheme cellPointFace;
        surfaceFormat       vtk;
        fields ( p );
        surfaces
        (
            ground
            {
                type        patch;
                patches     (ground);
                triangulate false;
            }
            pContours
            {
                type        isoSurface;
                isoField    p;
                isoValues   (1.1e5);
            }
            zNormal
            {
                type        cuttingPlane;
                planeType   pointAndNormal;
                pointAndNormalDict
                {
                    point   (0 0 0.5);
                    normal  (0 0 1);
                }
                interpolate true;
            }
            yNormal
            {
                type        cuttingPlane;
                planeType   pointAndNormal;
                pointAndNormalDict
                {
                    point   (0 0 0.5);
                    normal  (0 1 0);
                }
                interpolate true;
            }
            xNormal
            {
                type        cuttingPlane;
                planeType   pointAndNormal;
                pointAndNormalDict
                {
                    point   (0 0 0.5);
                    normal  (1 0 0);
                }
                interpolate true;
            }
        );
    }

    pressureProbes
    {
        type                probes;
        writeControl        timeStep;
        writeInterval       1;
        adjustLocations     yes;
        append yes;
        probeLocations
        (
            // probe locations in ( x y z ) format
            // unlimited number -- needs to be inside the domain!
            ( 2.0 0 0.5)    // In mesh
            (0 2.1 1.0)     // Not in mesh
            // etc.
        );
        fields
        (
            p
            impulse
        );
    }
};


// ************************************************************************* //
